<template>
  <div class="conts">
    <div class="ct1">
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="上传票据" name="first">
          <div class="conterons">
            <div>
              <el-form
                ref="formInline"
                :rules="rules"
                :model="formInline"
                label-width="100px"
                id="uploadForm"
              >
                <el-form-item label="">
                  <div class="item_bock flex flex_x_center">
                    <label>
                      <img :src="imgUrl" />
                      <input
                        type="file"
                        accept="image/*"
                        @change="handleFile"
                        class="hiddenInput"
                      />
                    </label>
                  </div>
                  <!-- <span class="yl">预览</span>
                  <span class="yl">更换图片</span> -->
                </el-form-item>
              </el-form>
            </div>
            <div>
              <el-form
                ref="formInline"
                :inline="true"
                :model="formInline"
                :rules="rules"
                class="demo-form-inline"
                label-width="180px"
              >
                <el-form-item label="请输入承兑行行号:" prop="bankNo">
                  <el-input
                    v-model="formInline.bankNo"
                    placeholder="承兑行行号"
                    maxlength="12"
                    @keyup="
                      formInline.bankNo = formInline.bankNo.replace(
                        /[^\d.]/g,
                        ''
                      )
                    "
                  ></el-input>
                </el-form-item>
                <el-form-item label="票面金额:" prop="draftMoney">
                  <el-input
                    v-model="formInline.draftMoney"
                    placeholder="请输入票面金额"
                    style="width: 218px"
                    maxlength="8"
                    oninput="value=value.replace(/[^\d.]/g,'')"
                  ></el-input>
                </el-form-item>
                <el-form-item label="票据号码:" prop="billNo">
                  <el-input
                    v-model="formInline.billNo"
                    placeholder="请输入票据号码"
                    type="number"
                    maxLength="12"
                  ></el-input>
                </el-form-item>
                <el-form-item label="到期日:" prop="endDate">
                  <!-- <el-input
                    placeholder="请选择日期"
                    suffix-icon="el-icon-date"
                    v-model="formInline.expireTime"
                  >
                  </el-input> -->
                  <el-date-picker
                    v-model="formInline.endDate"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
                </el-form-item>
                <!-- <el-form-item label="企业代码:">
                  <el-input
                    v-model="formInline.corpCode"
                    placeholder="请输入企业代码"
                  ></el-input>
                </el-form-item> -->
                <div>
                  <el-form-item style="position: initial; margin-left: 307px">
                    <el-button type="primary" @click="submitNew(formInline)"
                      >立即试算</el-button
                    >
                    <el-button @click="getVidsubm(formInline)"
                      >继续上传</el-button
                    >
                  </el-form-item>
                </div>
              </el-form>
            </div>
            <div></div>
          </div>
        </el-tab-pane>
        <el-tab-pane :label="`我的票据${totalss}张`" name="second">
          <div class="zb">
            <div class="fom">
              <el-form
                ref="formPiaoju"
                :inline="true"
                :model="formPiaoju"
                class="demo-form-inline"
              >
                <el-form-item label="票据编号:">
                  <el-input
                    v-model="formPiaoju.billNumber"
                    placeholder="票据编号"
                  ></el-input>
                </el-form-item>
                <el-form-item label="票据金额:">
                  <el-input
                    v-model="formPiaoju.billMoney"
                    placeholder="票据金额"
                  ></el-input>
                </el-form-item>
                <el-form-item label="承兑人:">
                  <el-input
                    v-model="formPiaoju.acceptor"
                    placeholder="承兑人"
                  ></el-input>
                </el-form-item>
                <el-form-item label="交易状态:">
                  <!-- <el-input
                    v-model="formPiaoju.billStatus"
                    placeholder="交易状态"
                  ></el-input> -->
                  <el-select
                    v-model="formPiaoju.billStatus"
                    placeholder="交易状态:"
                    style="width: 120px"
                  >
                    <el-option label="全部" value=""></el-option>
                    <el-option label="待交易" value="0"></el-option>
                    <el-option label="交易中" value="1"></el-option>
                    <el-option label="已交易" value="2"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item>
                  <el-button type="primary" @click="query(formPiaoju)"
                    >查询</el-button
                  >
                </el-form-item>
              </el-form>
            </div>
            <div>
              <div class="tup">
                <div class="tubj" v-for="item in tuTale">
                  <!-- <div :class="item.status=== 1? 'tubj':'tubj2' "  v-for="item in tuTale" > -->
                  <div>
                    <img
                      style="margin-left: 10px"
                      src="../../assets/yhxt.png"
                    />

                    <span class="djy" v-if="item.billStatus == 0">待交易</span>
                    <span class="djy2" v-if="item.billStatus == 1">交易中</span>
                    <span class="djy3" v-if="item.billStatus == 2">已交易</span>
                  </div>
                  <div style="text-align: center">
                    <div class="wz12">{{ item.billNumber }}</div>
                    <div>
                      <span class="wy">{{ item.billMoney }}</span
                      >万元
                    </div>
                  </div>
                  <div class="rq">{{ item.expireTime }}</div>
                  <div
                    style="
                      display: inline-flex;
                      margin-left: 22px;
                      margin-top: 14px;
                    "
                  >
                    <div
                      style="
                        width: 70px;
                        height: 25px;
                        background: #edf5ff;
                        border-radius: 6px;
                        cursor: pointer;
                      "
                      @click="pjxiangq(item)"
                    >
                      <span
                        style="
                          color: #0075ff;
                          line-height: 21px;
                          margin-left: 10px;
                        "
                        >查看详情</span
                      >
                    </div>
                    <div
                      style="
                        width: 70px;
                        height: 25px;
                        background: #0075ff;
                        border-radius: 6px;
                        margin-left: 10px;
                        cursor: pointer;
                      "
                      v-if="item.billStatus == 0"
                      @click="submitNewLib(item)"
                    >
                      <span
                        style="
                          color: #ffffff;
                          line-height: 21px;
                          margin-left: 10px;
                        "
                        >立即试算</span
                      >
                    </div>
                  </div>
                </div>
              </div>
              <!-- 分页数据 -->
              <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="formPiaoju.current"
                :page-sizes="[1, 2, 3, 5]"
                :page-size="5"
                layout="total, sizes, prev, pager, next, jumper"
                :total="formPiaoju.total"
                background
              >
              </el-pagination>
            </div>
          </div>
        </el-tab-pane>
      </el-tabs>
    </div>
    <div class="ct2">
      <span class="c1">智能推荐</span>
      <span class="c2">根据票面及企业信息与银行贴现要求智能匹配结果</span>
    </div>
    <div>
      <div v-if="listss.length > 0">
        <div class="ct3" v-for="(item, index) in listss">
          <div class="cc1">
            <div>
              <!-- <span class="dz"
                >单张限额：{{ item.perMinMoney }}-{{ item.perMaxMoney }}万</span
              > -->
              <!-- <img
                v-if="item.openAccountStatus == 0"
                src="../../assets/wkt.png"
                alt=""
                style="float: right; margin-right: -7px"
                @click="kaitong(item)"
              />
              <img
                v-if="item.openAccountStatus == 1"
                src="../../assets/wkt.png"
                alt=""
                style="float: right; margin-right: -7px"
                @click="kaitong(item)"
              />
              <span
                style="
                  float: right;
                  margin-top: 1px;
                  font-size: 14px;
                  font-weight: 400;
                  color: #ffffff;
                  cursor: pointer;
                  width: 73px;
                  height: 36px;
                  background: rgb(21, 190, 107);
                  border-radius: 20px 0px 0px 20px;
                  padding-left: 17px;
                  padding-top: 8px;
                "
                @click="kaitong(item)"
                >{{ item.openAccountStatus == 0 ? "未开通" : "已开通" }}</span
              > -->
            </div>
            <div>
              <img src="../../assets/z6.png" alt="" style="margin-top: 63px" />

              <div style="display: inline-flex; margin-left: 100px">
                <div class="wzs">
                  <p>贴现利率(%)</p>
                  <p class="z2">{{ item.rate }}</p>
                </div>
                <div class="wzs">
                  <p>计息天数(天)</p>
                  <p class="z2">{{ item.paymentDays }}</p>
                </div>
                <!-- <div class="wzs">
                  <p>预计金额(元)</p>
                  <p class="z2">{{ item.expectMoney }}</p>
                </div> -->
                <!-- <div class="wzs">
                  <p>授信额度(元)</p>
                  <p class="z22">
                    {{
                      item.isCreditLimit == "0"
                        ? "没有额度"
                        : item.isCreditLimit == "1"
                        ? "有额度"
                        : ""
                    }}
                  </p>
                </div> -->
              </div>
            </div>
            <div style="float: right; margin-right: 52px; margin-top: -70px">
              <!-- <el-button type="primary" @click="applyLimit(item)"
                >额度申请</el-button
              > -->
              <el-button
                type="primary"
                v-if="activeName == 'first'"
                @click="parentCompany33(item)"
                >提交意向单</el-button
              >
              <el-button
                type="primary"
                v-if="activeName == 'second'"
                @click="parentCompany(item)"
                >提交意向单</el-button
              >
            </div>
            <div>
              <el-dialog
                title="验证码"
                :visible.sync="dialogVisible"
                width="30%"
                :close-on-click-modal="true"
                :modal="true"
                :show-close="true"
                :center="true"
              >
                <el-form :model="Codeform" style="text-align: center">
                  <div style="display: flex">
                    <span>联系电话:</span>
                    <el-input
                      style="width: 181px; margin-top: -15px; margin-left: 5px"
                      v-model="Codeform.phone"
                      placeholder="请输入联系电话"
                    ></el-input>
                    <div
                      style="
                        width: 86px;
                        height: 30px;
                        background: #ffffff;
                        border: 1px solid #0075ff;
                        border-radius: 6px;
                        margin-left: 10px;
                        margin-top: -6px;
                      "
                    >
                      <span
                        style="
                          width: 69px;
                          height: 14px;
                          font-size: 14px;
                          font-family: Source Han Sans CN;
                          font-weight: 400;
                          color: #0075ff;
                          line-height: 28px;
                          margin-left: 8px;
                          cursor: pointer;
                        "
                        @click="getCode(Codeform)"
                        >发送验证码</span
                      >
                    </div>
                  </div>
                  <div style="display: flex; margin-top: 20px">
                    <span style="width: 70px">验证码:</span>
                    <el-input
                      style="width: 181px; margin-left: -5px; margin-top: -10px"
                      v-model="Codeform.code"
                      placeholder="请输入验证码"
                    ></el-input>
                  </div>
                </el-form>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="dialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="entrustqrtc(Codeform)"
                    >确 定</el-button
                  >
                </span>
              </el-dialog>
            </div>
            <div>
              <el-dialog
                title="验证码"
                :visible.sync="dialogVisible33"
                width="30%"
                :close-on-click-modal="true"
                :modal="true"
                :show-close="true"
                :center="true"
              >
                <el-form :model="Codeform" style="text-align: center">
                  <div style="display: flex">
                    <span>联系电话:</span>
                    <el-input
                      style="width: 181px; margin-top: -15px; margin-left: 5px"
                      v-model="Codeform.phone"
                      placeholder="请输入联系电话"
                    ></el-input>
                    <div
                      style="
                        width: 86px;
                        height: 30px;
                        background: #ffffff;
                        border: 1px solid #0075ff;
                        border-radius: 6px;
                        margin-left: 10px;
                        margin-top: -6px;
                      "
                    >
                      <span
                        style="
                          width: 69px;
                          height: 14px;
                          font-size: 14px;
                          font-family: Source Han Sans CN;
                          font-weight: 400;
                          color: #0075ff;
                          line-height: 28px;
                          margin-left: 8px;
                          cursor: pointer;
                        "
                        @click="getCode(Codeform)"
                        >发送验证码</span
                      >
                    </div>
                  </div>
                  <div style="display: flex; margin-top: 20px">
                    <span style="width: 70px">验证码:</span>
                    <el-input
                      style="width: 181px; margin-left: -5px; margin-top: -10px"
                      v-model="Codeform.code"
                      placeholder="请输入验证码"
                    ></el-input>
                  </div>
                </el-form>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="dialogVisible33 = false">取 消</el-button>
                  <el-button type="primary" @click="entrustqrtc2(Codeform)"
                    >确 定</el-button
                  >
                </span>
              </el-dialog>
            </div>
            <!--
            <div class="yanzms22">
              <el-dialog
                title="额度申请"
                :visible.sync="dialogVisible2"
                width="30%"
                 :center="true"
                :before-close="handleClose"
              >
                <el-form :model="Codeform2">
                  <div>
                    <span style="width: 70px">额度申请:</span>
                    <el-input
                      style="width: 181px"
                      type="number"
                      v-model="Codeform2.creditLimit"
                      placeholder="请输入额度申请"
                    ></el-input>
                    万元
                  </div>
                </el-form>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="dialogVisible2 = false">取 消</el-button>
                  <el-button type="primary" @click="applyLimit(Codeform)"
                    >确 定</el-button
                  >
                </span>
              </el-dialog>
            </div> -->
          </div>
        </div>
      </div>
      <div v-else>
        <div class="ct3">
          <div class="cc1">
            <div>
              <span class="dz">单张限额：-万</span>
              <!-- <img
                src="../../assets/zzz5.png"
                alt=""
                style="float: right; margin-right: -7px"
              /> -->
            </div>
            <div>
              <img src="../../assets/z6.png" alt="" style="margin-top: 22px" />

              <div style="display: inline-flex; margin-left: 59px">
                <div class="wzs">
                  <p>贴现利率(%)</p>
                  <p class="z2">---</p>
                </div>
                <div class="wzs">
                  <p>计息天数(天)</p>
                  <p class="z2">---</p>
                </div>
                <!-- <div class="wzs">
                  <p>预计金额(元)</p>
                  <p class="z2">---</p>
                </div> -->
                <!-- <div class="wzs">
                  <p>授信额度(元)</p>
                  <p class="z2">---</p>
                </div> -->
              </div>
            </div>
            <div style="float: right; margin-right: 52px; margin-top: -70px">
              <!-- <el-button type="primary">额度申请</el-button> -->
              <el-button type="primary" @click="dialogVisible = true"
                >提交意向单</el-button
              >
            </div>
            <div class="yanzms">
              <el-dialog
                title="验证码"
                :visible.sync="dialogVisible"
                width="30%"
                :center="true"
              >
                <el-form :model="Codeform" :rules="rules" ref="Codeform">
                  <div style="display: flex">
                    <span>联系电话:</span>
                    <el-input
                      style="width: 181px; margin-top: -11px"
                      v-model="Codeform.phone"
                      placeholder="请输入联系电话"
                    ></el-input>
                    <div
                      style="
                        width: 86px;
                        height: 30px;
                        background: #ffffff;
                        border: 1px solid #0075ff;
                        border-radius: 6px;
                        margin-left: 10px;
                        margin-top: -6px;
                      "
                    >
                      <span
                        style="
                          width: 69px;
                          height: 14px;
                          font-size: 14px;
                          font-family: Source Han Sans CN;
                          font-weight: 400;
                          color: #0075ff;
                          line-height: 28px;
                          margin-left: 8px;
                          cursor: pointer;
                        "
                        @click="getCode(Codeform)"
                        >发送验证码</span
                      >
                    </div>
                  </div>
                  <div style="display: flex; margin-top: 20px">
                    <span style="width: 70px">验证码:</span>
                    <el-input
                      style="width: 181px; margin-left: -15px"
                      v-model="Codeform.code"
                      placeholder="请输入验证码"
                    ></el-input>
                  </div>
                </el-form>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="dialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="entrustqrtc"
                    >确 定</el-button
                  >
                </span>
              </el-dialog>
            </div>

            <div class="yanzms22">
              <el-dialog
                title="额度申请"
                :visible.sync="dialogVisible2"
                width="30%"
                :before-close="handleClose"
              >
                <el-form :model="Codeform2">
                  <div>
                    <span style="width: 70px">额度申请:</span>
                    <el-input
                      style="width: 181px"
                      v-model="Codeform2.creditLimit"
                      placeholder="请输入额度申请"
                    ></el-input>
                    万元
                  </div>
                </el-form>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="dialogVisible2 = false">取 消</el-button>
                  <el-button type="primary" @click="dialogVisible2 = false"
                    >确 定</el-button
                  >
                </span>
              </el-dialog>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import {
  creatChainCode,
  creatAPP,
  querypj,
  getCode,
  creatAPPpj,
  checkCode,
  entrustqr,
  applyAuth,
  confirmPlatformDisc,
  shenq,
} from "@/api/leagues/app";
import { dateFormat } from "@/utils/date";
import qs from "qs";
export default {
  data() {
    return {
      activeName: "first",
      nextProjectForm: {
        publicWelfareUrl: "",
      },
      listss: {},
      dialogImageUrl: "",
      dialogVisible: false,
      dialogVisible2: false,
      dialogVisible33: false,
      input: "",
      input2: "",
      input1: "",
      formInline: {
        billImg: "",
        // expireTime: "",
        billMoney: "",
        acceptor: "",
        billNumber: "",
      },
      imgUrl: require("../../assets/sctp.png"),
      emnt: "",

      formPiaoju: {
        billNumber: "",
        acceptor: "",
        billMoney: "",
        billStatus: "",
        total: 0,
        current: 1,
        size: 5,
      },
      expireTime: "",
      acceptore: "",
      billMoneys: "",
      billNumbers: "",
      Codeform: {
        phone: "",
        code: "",
        bankId: "",
        isNew: "0",
        sysBankReqDetailId: "",
      },
      Codeform2: {
        creditLimit: "",
      },
      yzma: "",
      totalss: "",
      // 查询参数
      queryInfo: {
        total: 0,
        current: 1,
        size: 5,
      },
      // 总条数
      tuTale: [],

      rules: {
        bankNo: [
          {
            required: true,
            message: "请输入承兑行行号长度12个字符",
            min: 12,
            max: 12,
            trigger: "blur",
          },
        ],
        draftMoney: [
          { required: true, message: "请输入票面金额", trigger: "blur" },
        ],
        billNo: [
          { required: true, message: "请输入票据号码", trigger: "blur" },
        ],
        endDate: [
          {
            type: "date",
            required: true,
            message: "请输入到期日",
            trigger: "change",
          },
        ],
      },
    };
  },
  created() {
    // 根据分页获取对应的商品列表
    this.getGoodsList();
  },
  //方法集合
  methods: {
    // 子组件传值给父组件-公司
    parentCompany(obj) {
      this.dialogVisible = true;
      console.log("parentCompany", obj);
      this.setCompany(obj);
    },
    parentCompany33(obj) {
      debugger;
      this.dialogVisible33 = true;
      console.log("parentCompany33", obj);
      this.setCompany33(obj);
    },
    parentEdu(obj) {
      this.dialogVisible2 = true;
      // console.log("parentEdu", obj);
      this.setCompany2(obj);
    },
    uploadHeadImg: function () {
      this.$el.querySelector(".hiddenInput").click();
    },
    // 将头像显示
    handleFile: function (e) {
      let $target = e.target || e.srcElement;
      this.file = $target.files[0];
      console.log(this.file, "file");
      var reader = new FileReader();
      reader.onload = (data) => {
        let res = data.target || data.srcElement;
        this.imgUrl = res.result;
      };
      reader.readAsDataURL(this.file);
      // let files = new FormData(e. target. files[0] );
    },
    getVidsubm(row) {
      var that = this;
      //  this.param = new FormData();
      //  this.param.append("billImg", this.file);
      //  this.param.append("billNumber", this.formInline.billNumber);
      //  this.param.append("acceptor", this.formInline.acceptor);
      //  this.param.append("billMoney", this.formInline.billMoney);
      // this.param.append("expireTime", this.formInline.expireTime);

      // this.$post("/admin/enterprise/uploadBill", this.param).then(
      //   (res) => {
      //     if (res) {
      //     }
      //   }
      // );
      creatChainCode(that.file, row)
        .then((data) => {
          if (data.data.code == 0) {
            that.$message.success("上传成功");
            this.getGoodsList();
            this.formInline.bankNo = "";

            this.formInline.draftMoney = "";

            this.formInline.endDate = "";

            this.formInline.billNo = "";

            this.imgUrl = this.imgUrl;
          } else if (data.data.code == 1) {
            debugger;
            that.$message({
              message: data.data.msg,
              type: "warning",
            });
          }
        })
        .catch((error) => {
          console.log(error);
        });
    },

    // 列表操作安钮
    handleClick(tab, event) {
      console.log(tab, event);
    },
    //票据列表
    getGoodsList: function () {
      querypj(this.formPiaoju).then((response) => {
        if (response) {
          this.tuTale = response.data.data.records;
          this.formPiaoju.size = response.data.data.size;
          console.log(this.formPiaoju.size, "this.queryInfo.size");
          this.formPiaoju.current = response.data.data.current;
          this.formPiaoju.total = response.data.data.total;
          this.totalss = response.data.data.total;
          console.log(this.tuTale, "this.tuTale");
          // this.$message({
          //   duration: 600,
          //   message: "查询成功",
          //   type: "success",
          // });
        } else {
          this.$message.success(response.msg);
        }
      });
    },
    //票据查询
    query: function () {
      this.$refs.formPiaoju.validate((valid) => {
        if (valid) {
          querypj(this.formPiaoju).then((response) => {
            if (response) {
              this.getGoodsList();
              // this.$message.success("查询成功");
            } else {
              that.$message({
                duration: 600,
                message: response.data.data.msg,
                type: "warning",
              });
            }
            // that.$message.success(data.msg)
          });
        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },
    //开通
    kaitong: function (item) {
      applyAuth(item.bankId).then((response) => {
        if (response.data.code == 0) {
          this.$message({
            duration: 1000,
            message: response.data.msg,
            type: "warning",
          });
        } else {
          this.$message({
            duration: 1000,
            message: response.data.data.msg,
            type: "warning",
          });
        }
      });
    },
    //分页
    handleSizeChange(newSize) {
      this.formPiaoju.size = newSize;
      this.getGoodsList();
    },
    handleCurrentChange(newPage) {
      this.formPiaoju.current = newPage;
      this.getGoodsList();
    },
    //立即试算
    submitNew: function (row) {
      this.$refs.formInline.validate((valid) => {
        if (valid) {
          var that = this;
          creatAPP(that.file, row)
            .then((data) => {
              // that.$message({
              //   duration: 600,
              //   message: "试算成功",
              //   type: "success",
              // });
              if (data.data.code == 0) {
                console.log(data.data.data, "1");
                this.listss = data.data.data;
                this.getGoodsList();
              } else if (data.data.code == 1) {
                that.$message({
                  duration: 600,
                  message: data.data.msg,
                });
              }
            })
            .catch((error) => {
              console.log(error);
            });
        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },

    //票据立即试算
    submitNewLib: function (row) {
      this.expireTime = row.expireTime;
      this.acceptore = row.acceptBankNumber;
      this.billMoneys = row.billMoney;
      this.billNumbers = row.billNumber;
      var that = this;
      let file = "";
      creatAPPpj(file, row)
        .then((data) => {
          // that.$message({
          //   duration: 600,
          //   message: "试算成功",
          //   type: "success",
          // });
          this.listss = data.data.data;
        })
        .catch((error) => {
          console.log(error);
        });
    },
    //票据详情
    pjxiangq(row) {
      //详情
      // this.editNetWork = row;
      // this.editRowId = row.id;
      this.$router.push({
        path: "editNewAlert",
        query: { editRowId: row.id, editNetWork: row },
      });
    },

    //获取验证码
    getCode: function (Codeform) {
      getCode(Codeform).then((response) => {
        if (response.data.code == 0) {
          this.Codeform.code = response.data.data;
        } else if (response.data.code == 1) {
          this.$message({
            duration: 600,
            message: response.data.msg,
            type: "warning",
          });
        }
      });
    },
    entrustqrtc: function (obj) {
      checkCode(this.Codeform).then((data) => {
        debugger;
        if (data.data.code == 0) {
          this.formInline.billId = obj.billId;
          this.formInline.bankId = obj.bankId;
          this.formInline.bankno = this.acceptore;
          this.formInline.draftmoney = this.billMoneys;
          this.formInline.billNo = this.billNumbers;
          (this.formInline.endDate = this.expireTime),
            // this.formInline.endDate = dateFormat(
            //   "YYYYMMDD"
            // );

            // this.Codeform.billNo = this.formInline.billNo;
            // this.Codeform.bankNo = this.formInline.bankNo;
            // this.Codeform.draftMoney = this.formInline.draftMoney;
            this.$message({
              duration: 1000,
              message: data.data.msg,
              type: "success",
            });
          //let rowss = this.formInline;
          let rowss = this.formInline;
          confirmPlatformDisc(rowss).then((resdata) => {
            if (resdata.data.code == 0) {
              // this.$refs[Codeform].resetFields();
              this.$message({
                duration: 1000,
                message: resdata.data.msg,
                type: "success",
              });

              this.dialogVisible = false;
            } else if (resdata.data.code == 1) {
              this.$message({
                duration: 3000,
                message: resdata.data.msg,
                type: "warning",
              });
              // this.dialogVisible = false;
            }
          });
        } else if (data.data.code == 1) {
          this.$message({
            duration: 1000,
            message: data.data.msg,
            type: "warning",
          });
        }
      });
    },
    entrustqrtc2: function (obj) {
      checkCode(this.Codeform).then((data) => {
        if (data.data.code == 0) {
          this.formInline.billId = obj.billId;
          this.formInline.bankId = obj.bankId;
          this.formInline.endDate = dateFormat(
            this.formInline.endDate,
            "YYYYMMDD"
          );

          // this.Codeform.billNo = this.formInline.billNo;
          // this.Codeform.bankNo = this.formInline.bankNo;
          // this.Codeform.draftMoney = this.formInline.draftMoney;

          let rowss = this.formInline;
          confirmPlatformDisc(rowss).then((resdata) => {
            if (resdata.data.code == 0) {
              // this.$refs[Codeform].resetFields();
              this.$message({
                duration: 1000,
                message: resdata.data.data.msg,
                type: "success",
              });
              this.dialogVisible33 = false;
            } else if (resdata.data.code == 1) {
              this.$message({
                duration: 600,
                message: response.data.data.msg,
                type: "warning",
              });
            }
          });
        }
      });
    },

    applyLimit: function (obj) {
      this.Codeform2.bankId = obj.bankId;
      shenq(this.Codeform2.bankId).then((data) => {
        if (data.data.code == 0) {
          this.$message({
            message: data.data.msg,
            type: "warning",
          });
        } else {
        }
      });
    },
    setCompany(obj) {
      // $emit触发当前实例上的事件
      // 触发父组件的children事件，将this.form回传过去
      console.log(obj, " this.form");
      this.Codeform.bankId = obj.bankId;
      this.Codeform.billId = obj.billId;
      this.Codeform.sysBankReqDetailId = obj.sysBankReqDetailId;
      // 关闭对话框
      this.dialogFormVisible = false;
    },
    setCompany33(obj) {
      // $emit触发当前实例上的事件
      // 触发父组件的children事件，将this.form回传过去
      console.log(obj, " this.form");
      this.Codeform.bankId = obj.bankId;
      this.Codeform.billId = obj.billId;
      this.Codeform.sysBankReqDetailId = obj.sysBankReqDetailId;
      // 关闭对话框
      this.dialogFormVisible33 = false;
    },

    setCompany2(obj) {
      // $emit触发当前实例上的事件
      // 触发父组件的children事件，将this.form回传过去
      console.log(obj, " this.form");
      this.Codeform.bankId = obj.bankId;
      this.Codeform.billId = obj.billId;
      this.Codeform.sysBankReqDetailId = obj.sysBankReqDetailId;
      // 关闭对话框
      this.dialogFormVisible2 = false;
    },
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then((_) => {
          done();
        })
        .catch((_) => {});
    },
  },
};
</script>
<style  scoped>
.item_bock img {
  width: 200px;
  height: 175px;
}
.item_bock .hiddenInput {
  display: none;
}
.zb {
  width: 1200px;
  height: 335px;
  background: #ffffff;
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  padding: 17px 0 0 42px;
  margin-top: 16px;
}
.tup {
  display: flex;
}
.rq {
  width: 170px;
  height: 20px;
  background: #f5f6f7;
  border-radius: 4px;
  margin-left: 10px;
}
.yanzms >>> .el-dialog {
  width: 25% !important;
}
.yanzms >>> .el-dialog--center .el-dialog__body {
  margin-left: 70px !important;
}
.wz12 {
  font-size: 15px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #051232;
  line-height: 43px;
  text-align: center;
}
.wy {
  width: 52px;
  height: 24px;
  font-size: 16px;
  font-family: Source Han Sans CN;
  font-weight: 800;
  color: #fe680e;
}
.djy {
  width: 38px;
  height: 13px;
  font-size: 13px;
  font-weight: bold;
  color: #0075ff;
  line-height: 32px;
  margin-left: 60px;
}
.djy2 {
  width: 38px;
  height: 13px;
  font-size: 13px;
  font-weight: bold;
  color: #fe680e;
  line-height: 32px;
  margin-left: 60px;
}
.djy3 {
  width: 38px;
  height: 13px;
  font-size: 13px;
  font-weight: bold;
  color: #051232;
  line-height: 32px;
  margin-left: 60px;
}
.tubj {
  background: url(../../assets/sk.png) no-repeat;
  height: 200px;
  width: 230px;
}
.tubj2 {
  background: url(../../assets/jk.png) no-repeat;
  height: 200px;
  width: 230px;
}
.z2 {
  /* width: 45px;
  height: 24px; */
  font-size: 25px;
  font-family: Source Han Sans CN;
  font-weight: 800;
  color: #fe680e;
  line-height: 30px;
}
.z22 {
  font-size: 20px;
  font-family: Source Han Sans CN;
  font-weight: 800;
  color: #fe680e;
  line-height: 30px;
}
.wzs {
  width: 188px;
  height: 17px;
  font-size: 16px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #9498b6;
  line-height: 30px;
  text-align: center;
}
.dz {
  background: #e5f1ff;
  opacity: 0.5;
  border-radius: 0px 23px 23px 0px;
  font-size: 16px;
  position: relative;
  padding: 10px 10px 10px 10px;
  top: 10px;
}
.cc1 {
  width: 1200px;
  height: 248px;
  background: #ffffff;
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  margin-left: 189px;
  margin-top: 10px;
  margin: 0 auto !important;
}

.ct1 {
  margin: 0 auto !important;
  width: 1200px;
}
.ct2 {
  /* margin-left: 189px; */
  margin: 0 auto !important;
  width: 1200px;
  padding-top: 16px;
  padding-bottom: 17px;
}
.ct3 {
  margin: 10px;
}
.c1 {
  width: 103px;
  height: 25px;
  font-size: 26px;
  font-weight: bold;
  color: #051232;
}
.c2 {
  margin-left: 10px;
  width: 351px;
  height: 15px;
  font-size: 16px;
  font-weight: 400;
  color: #586279;
}
.conterons {
  width: 1200px;
  height: 290px;
  background: #ffffff;
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  display: flex;
  padding-top: 41px;
  margin-top: 16px;
  /* padding-left: 53px; */
}
.yl {
  width: 51px;
  height: 13px;
  font-size: 13px;
  font-weight: 400;
  color: #0075ff;
  margin-left: 22px;
}
/*tabs 去掉el-tab-pane切换时的蓝色下划线*/
>>> .el-tabs__active-bar {
  background-color: transparent !important;
}
>>> .el-tabs__nav-wrap::after {
  background-color: transparent !important;
}
>>> .el-tabs__header {
  margin: 0 auto !important;
  width: 1200px;
}

>>> .el-tabs__nav {
  width: 311px;
  height: 40px;
  background: #ffffff !important;
  border-radius: 20px;
  text-align: center;
}
>>> .el-tabs__item.is-active {
  background: #0075ff;
  box-shadow: 0px 3px 8px 0px rgba(0, 117, 255, 0.2);
  border-radius: 20px;
}
>>> .el-tabs__item {
  width: 150px;
  height: 40px;
  color: #8995ad;
}
>>> .el-tabs__item.is-active {
  color: #ffffff;
}

.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
.el-upload--picture-card i {
  font-size: 58px;
  color: #8c939d;
  margin-top: 30px;
}
.sc {
  font-size: 18px;
  display: flex;
}
.el-form-item__content {
  margin-left: 0px !important;
}
.el-tabs__content {
  margin: 0 auto !important;
  width: 1200px;
  padding-top: 21px;
}
</style>
